package com.example.demo.Service;

import com.example.demo.Mapper.GsdtMapper;
import com.example.demo.pojo.Gsdt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class GsdtServiceImpl implements GsdtService {
    @Autowired
    GsdtMapper gsdtMapper;
    @Override
    public List<Gsdt> getAllGsdt() {
        return gsdtMapper.selectList(null);
    }

    @Override
    public Gsdt selectGsdtById(Integer id) {
        return gsdtMapper.getGsdtById(id);
    }

    @Override
    public Integer InsertGsdt(Gsdt blog) {
        return gsdtMapper.insert(blog);
    }

    @Override
    public Integer DeleteGsdt(Integer id) {
        return gsdtMapper.deleteById(id);
    }

    @Override
    public Integer UpdateGsdt(Integer id, Gsdt blog) {
        return gsdtMapper.updateById(blog);
    }
}
